﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.Model.Models.LyModel
{
    /// <summary>
    /// 供应商应付账单类
    /// </summary>
    [Table("T_VendorTransaction")]
    public class VendorTransaction:BaseEntity
    {
       
        public int VendorId { get; set; }  // 供应商ID
        public string VendorName { get; set; }  // 供应商名称
        public string ContactPerson { get; set; }  // 联系人
        public string PhoneNumber { get; set; }  // 联系电话
        public string Email { get; set; }  // 联系邮箱
        public string Address { get; set; }  // 地址

        // 采购项信息
        public string ItemName { get; set; }  // 商品名称
        public decimal UnitPrice { get; set; }  // 单价
        public int Quantity { get; set; }  // 数量
        public decimal TotalAmount => UnitPrice * Quantity;  // 总金额

        // 账单明细信息
        public DateTime InvoiceDate { get; set; }  // 账单日期
        public decimal InvoiceAmount { get; set; }  // 账单金额
        public decimal PaidAmount { get; set; }  // 已支付金额
        public decimal DueAmount => InvoiceAmount - PaidAmount;  // 应付金额
    }
}
